package com.crayon2f.test;

import cn.hutool.http.HttpUtil;
import org.junit.Test;

import java.io.File;

public class TSFileDownload {

    private static final String name = "口交-大屌-熟女-進來我裡面吧";
    private static final String date = "20230403";
    private static final String group = "欧美无码";

    private static final String url = String.format("%s/%s/%s", date, group, name);
    private static final String host = "https://s1.kinplaer.xyz/king01";
    private static final String download_path = "/Users/crayon2f/Downloads/file/video";


    @Test
    public void download() {

        for (int i = 0; i < 872; i++) {
            String downloadFile = String.format("%s/%s/%s/%d.ts", download_path, group, name, i);
            File file = new File(downloadFile);
            String downloadUrl = String.format("%s/%s.ts", host, "");
            HttpUtil.downloadFile(downloadUrl, file);
            System.out.println(downloadFile + "  ------- done !");
        }


    }
}
